<template>
   <van-sticky>
      <van-nav-bar
         left-arrow
         v-show="!$route.meta.hideNavBar">
         <template #left>

            <div
               @click="onLeftClick"
               v-if="$route.meta.isTabPage">
               <span style="margin-right: 5px; font-size: 12px">广州</span>
               <van-icon
                  color="#aaa"
                  name="arrow-down"
                  size="8" />
            </div>

            <div
               v-else
               @click="$router.back()">
               <van-icon
                  color="#666"
                  name="arrow-left"
                  size="20" />
            </div>
         </template>

         <template #title>
            <span style="color: #666">{{ $route.meta.title }}</span>
         </template>

         <template #right>
            <van-icon
               color="#aaa"
               name="search"
               size="20" />
         </template>
      </van-nav-bar>
   </van-sticky>
</template>

<script>
export default {
   methods:{
      onLeftClick(){
         this.$router.push('/cities')
      }
   }
};
</script>

<style lang="less" scoped></style>
